import getLogger from './utils/logger.js'
import express from 'express'

const LOG = getLogger('server')

const app = express()

LOG.verbose('Configuring server...')

app.use(express.json())

app.get('/api/ping', (req, res) => {
  res.send('pong')
})
LOG.verbose('/api/ping registered')

app.get('/api', (req, res) => {
  res.json({ message: 'Hello from backend API!' })
})
LOG.verbose('/api demo entry registered')

LOG.trace('Backend server configured')

export default app
